<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<style>
		/* 隐藏body窗口区域滚动条 */
		body{
			margin: 0;
			overflow: hidden;
		}
	</style>
	<script src="./three.js"></script>
	<body>
		<script>
			
			var renderer = new THREE.WebGLRenderer();
			renderer.setSize( window.innerWidth, window.innerHeight );
			document.body.appendChild( renderer.domElement );
			//相机
			var camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 500 );
			camera.position.set( 0, 0, 100 );
			camera.lookAt( 0, 0, 0 );
			
			var scene = new THREE.Scene();
			
			//材质
			//create a blue LineBasicMaterial
			var material = new THREE.LineBasicMaterial( { color: 0x0000ff } );
			
			//带顶点的geo
			var geometry = new THREE.Geometry();
			geometry.vertices.push(new THREE.Vector3( -10, 0, 0) );
			geometry.vertices.push(new THREE.Vector3( 0, 10, 0) );
			geometry.vertices.push(new THREE.Vector3( 10, 0, 0) );
			
			//画线
			var line = new THREE.Line( geometry, material );
			
			scene.add( line );
			renderer.render( scene, camera );
			
			
		</script>
	</body>
</html>
